For an image forming apparatus, there has been proposed a control device which indicates a necessity to replace a cartridge in a case where a remaining amount of toner in the cartridge detected by an optical sensor is less than a defined value, or in a case where a number of revolutions of a developing roller detected by a revolution counter exceeds a defined value.